{template 'header'}
<!--当前位置-->
<div class="location layout960">
	当前位置: <a href="{SITE_URL}">首页</a>&nbsp;»&nbsp; <a href="{url('extend/webpage', 'itemid='.$itemid)}">{$title}</a>
</div>
<!--当前位置 end-->
<div class="layout960 fn-clear">
	<div class="sidebar fn-left">
		<ul>
			<li><a href="{SITE_URL}">网站首页</a></li>
			<!--{php $webpages = Template::tag("table=webpage&condition=title='广告服务' &template=null")}-->
			<!--{loop $webpages $k $t}-->
			<li ><a href="{url('extend/webpage', 'itemid='.$t[itemid])}">广告服务</a></li>
			<!--{/loop}-->
			{php $ads = xd_ext_ad_page_cats();}
			{if $ads[all]}
			<li  class="js-station-list">
				<a href="javascript:void(0)">总站广告位</a>
				<ul class="fn-hide">
					{loop $ads[all] $ka $va}
					<li id="sub_cat_{$va[itemid]}"><a title="{$va[title]}" href="{url('extend/webpage', 'itemid='.$va[itemid])}">{$va[title]}</a></li>
					{/loop}
				</ul>
			</li>
			{/if}
			{if $ads[sub]}
			<li  class="js-station-list">
				<a href="javascript:void(0)">分站广告位</a>
				<ul class="fn-hide">
					{loop $ads[sub] $ka $va}
					<li id="sub_cat_{$va[itemid]}"><a title="{$va[title]}" href="{url('extend/webpage', 'itemid='.$va[itemid])}">{$va[title]}</a></li>
					{/loop}
				</ul>
			</li>
			{/if}
		</ul>
        <script>
            seajs.use(["$"],function($){
                $(".js-station-list").each(function(){
                    var openUp = false;
                    $(this).click(function() {
                        if(openUp){
                            $(this).children("ul").slideUp(100);
                            openUp = false;
                        }else{
                            $(this).children("ul").slideDown(100);
                            openUp = true;
                        }
                    });
                });
            })
        </script>
	</div>
	<div class="layout-right725 fn-right">
		<h2 class="title">
			<a href="{url('extend/webpage', 'itemid='.$itemid)}">{$title}</a>
			<a class="ad-apply" href="{url('extend/ad')}">申请广告</a>
		</h2>
		<div class="content" >
			{$content}
		</div>
	</div>
</div>
<script>
	seajs.use([], function(){
		$('#sub_cat_{$itemid}').addClass('active').parent().show();
	})
</script>
<!--主体部分 end-->
</div>
{template 'footer'}

